/***
* ==++==
*
* Copyright (c) Microsoft Corporation.  All rights reserved.
*
* ==--==
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* registry.h
*
* registry_node: A map structure for hierarchical (think URIs) keys.
*
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
****/

#pragma once

namespace actors
{

template<typename Element>
struct registry_node
{
    registry_node() : m_delegate(nullptr) {}

    ~registry_node()
    {
        for (auto iter = m_children.begin(); iter != m_children.end(); iter++)
        { 
            delete iter->second; 
        }
    }

    Element m_delegate;
    std::map<std::string, registry_node *> m_children;
};

} // namespace actors